package com.ruoyi.expo.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.expo.mapper.ExCarouselMapper;
import com.ruoyi.expo.domain.ExCarousel;
import com.ruoyi.expo.service.IExCarouselService;

/**
 * 展会轮播Service业务层处理
 * 
 * @author code_yong
 * @date 2023-09-20
 */
@Service
public class ExCarouselServiceImpl implements IExCarouselService 
{
    @Autowired
    private ExCarouselMapper exCarouselMapper;

    /**
     * 查询展会轮播
     * 
     * @param id 展会轮播主键
     * @return 展会轮播
     */
    @Override
    public ExCarousel selectExCarouselById(Long id)
    {
        return exCarouselMapper.selectExCarouselById(id);
    }

    /**
     * 查询展会轮播列表
     * 
     * @param exCarousel 展会轮播
     * @return 展会轮播
     */
    @Override
    public List<ExCarousel> selectExCarouselList(ExCarousel exCarousel)
    {
        return exCarouselMapper.selectExCarouselList(exCarousel);
    }

    /**
     * 新增展会轮播
     * 
     * @param exCarousel 展会轮播
     * @return 结果
     */
    @Override
    public int insertExCarousel(ExCarousel exCarousel)
    {
        exCarousel.setCreateTime(DateUtils.getNowDate());
        return exCarouselMapper.insertExCarousel(exCarousel);
    }

    /**
     * 修改展会轮播
     * 
     * @param exCarousel 展会轮播
     * @return 结果
     */
    @Override
    public int updateExCarousel(ExCarousel exCarousel)
    {
        exCarousel.setUpdateTime(DateUtils.getNowDate());
        return exCarouselMapper.updateExCarousel(exCarousel);
    }

    /**
     * 批量删除展会轮播
     * 
     * @param ids 需要删除的展会轮播主键
     * @return 结果
     */
    @Override
    public int deleteExCarouselByIds(Long[] ids)
    {
        return exCarouselMapper.deleteExCarouselByIds(ids);
    }

    /**
     * 删除展会轮播信息
     * 
     * @param id 展会轮播主键
     * @return 结果
     */
    @Override
    public int deleteExCarouselById(Long id)
    {
        return exCarouselMapper.deleteExCarouselById(id);
    }
}
